package com.example.demo.elasticsearch;

import org.springframework.data.elasticsearch.annotations.Query;

import java.util.List;

public interface BlogService {
    void add(BlogEntity entity);

    BlogEntity getById(String id);

    List<BlogEntity> list();

    void update(BlogEntity entity);

    @Query("{\"match_phrase\":{\"title\":\"?0\"}}")
    List<BlogEntity> findByTitle(String keywords);
}
